<?php if (isset($_GET['enviado'])) { ?>
    <img src="http://www.gestiondecontactos.com.ar/trkmm/crmconv_518.png" />
    <!-- Google Code for bepoket Conversion Page -->
    <script type="text/javascript">
        /* <![CDATA[ */
        var google_conversion_id = 980924914;
        var google_conversion_language = "en";
        var google_conversion_format = "3";
        var google_conversion_color = "ffffff";
        var google_conversion_label = "21QQCMaRhggQ8vPe0wM";
        var google_conversion_value = 1.000000;
        var google_remarketing_only = false;
        /* ]]> */
    </script>
    <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
        <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/980924914/?value=1.000000&amp;label=21QQCMaRhggQ8vPe0wM&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>
<?php } ?>

<div class="cuerpo-contacto">
    <div class="box-contacto">
        <div class="datos-contacto">
            <div><img src="<?php bloginfo('template_url'); ?>/images/mail.png" alt="mail"/>info@bepoketprint.com</div>
            <div><img src="<?php bloginfo('template_url'); ?>/images/tel.png" alt="tel"/>5411 3220-5551</div>
            <div><img src="<?php bloginfo('template_url'); ?>/images/blog.png" alt="blog"/>Blog / <a href="<?php bloginfo("url"); ?>/?cat=<?php echo get_cat_ID('Blog') ?>">www.bepoketprint.com/blog</a></div>
<!--            <div><img src="<?php //bloginfo('template_url');      ?>/images/lapiz.png" alt="suscripcion"/>Suscripcion Newsletter</div>-->
        </div>
        <div class="otro-contacto">
            <h3>Contacto</h3>

            <div class="red-soc">
                <h3>Seguinos</h3>
                <ul>
                    <!--                    <li><a href="#" class="ico-YT"></a></li>
                                        <li><a href="#" class="ico-FB"></a></li>
                                        <li><a href="#" class="ico-P"></a></li>
                                        <li><a href="#" class="ico-TW"></a></li>
                                        <li><a href="#" class="ico-IN"></a></li>-->
                    <?php $links = get_bookmarks('category_name=Redes Sociales&orderby=link_id'); ?>
                    <?php
                    foreach ($links as $link) {
                        if ($link->link_name == 'Youtube') {
                            $clase = 'ico-YT';
                        } elseif ($link->link_name == 'Facebook') {
                            $clase = 'ico-FB';
                        } elseif ($link->link_name == 'Pinterest') {
                            $clase = 'ico-P';
                        } elseif ($link->link_name == 'Twitter') {
                            $clase = 'ico-TW';
                        } elseif ($link->link_name == 'Linkedin') {
                            $clase = 'ico-IN';
                        } else {
                            $clase = '';
                        }
                        ?>
                        <li><a href="<?php echo $link->link_url; ?>" class="<?php echo $clase; ?>" target="_blank" title="<?php echo $link->link_name; ?>"></a></li>
                    <?php } ?>
                </ul>
            </div>
        </div>
    </div>

    <div class = "box-widget caja-tips-contacto">
        <div class="titulo-caja"><a>Consultas</a></div>
        <div class="cuerpo-caja">
            <div class="texto-caja"></div>
            <form action="" method="post" id="enviar_mail_contacto">
                <label style="color: red; margin-right: 3%;">*</label><input class="text-contact" type="text" name="nombre_contacto" size="30" maxlength="30" <?php //textoAyuda('Nombre:')        ?> placeholder="Nombre:" required style="width: 90%;"/><br/>
                <label style="color: red; margin-right: 3%;">*</label><input class="text-contact" type="text" name="mail_contacto" size="30" maxlength="30" <?php //textoAyuda('Mail:')        ?> placeholder="Mail:" required style="width: 90%;"/><br/>
                <label style="color: red; margin-right: 3%;">*</label><input class="text-contact" type="text" name="tel_contacto" size="30" maxlength="30" <?php //textoAyuda('Tel:')        ?> placeholder="Tel:" required style="width: 90%;"/><br/>
                <br/>
                <label>Consulta:</label><label style="color: red;">*</label><br/>
                <textarea name="consulta_contacto" rows="4" cols="10" required style="margin: 10px 0px;"></textarea>
                <img src="<?php bloginfo('template_url'); ?>/customs/captcha/captcha.php" id="captcha" style="width: 100px; float: left;"/>
                <a id="change-image" style="cursor: pointer; float: left; margin: 0px 8px;" onclick="document.getElementById('captcha').src = '<?php bloginfo('template_url'); ?>/customs/captcha/captcha.php?' + Math.random();">
                    <img src="<?php bloginfo('template_url'); ?>/images/reload.png"/>
                </a>
                <input class="text-contact" type="text" name="captcha" id="captcha-form" autocomplete="off" required style="float: left; width: 37%;"/>
                <input type = "submit" name = "boton_enviar_contacto" value = "Enviar"/>
            </form>
            <?php //echo do_shortcode('[contact-form-7 id="220" title="Contacto"]'); ?>
        </div>
    </div>
    <div id="popup-contacto" style="margin-left: -195px;">
        <div class="closeC"></div>
        <div id="cuerpo">
            <div class="cargando">
                <div>Enviando...</div>
                <img src="http://www.bepoketprint.com/wp-content/themes/Bepoketprint/images/loader.gif">
            </div>
            <div id="texto"></div>
        </div>
    </div>
    <div id="backgroundPopupC"></div>

    <div class="box-preg-frec">
        <h2 style="margin-bottom: 20px;">Las preguntas frecuentes principales</h2>
        <div class="preg">
            <ul id="R-1">
                <?php $query = new WP_Query('category_name=Preguntas frecuentes&tag=Principales&showposts=20'); ?>

                <?php while ($query->have_posts()) : $query->the_post(); ?>
                    <li class="R-1<?php if (false) echo ' activo'; ?>">
                        <h3><?php the_title(); ?></h3>
                        <div class="resu"><?php the_excerpt(30); ?></div>
                    </li>
                <?php endwhile; ?>
            </ul>
        </div>
        <a href="<?php bloginfo("url"); ?>/?cat=<?php echo get_cat_ID('Preguntas frecuentes') ?>">Leer más...</a>
    </div>

    <div class="box-widget caja-tips-blog" style="background-color: #E5E6E7;">
        <?php $query2 = new WP_Query("category_name=garantia&showposts=1"); ?>
        <?php if ($query2->have_posts()) : $query2->the_post() ?>
            <div class="titulo-caja"><a><?php the_title(); ?></a></div>
            <div class="cuerpo-caja">
                <div class="imagen">
                    <?php
                    if (get_the_post_thumbnail()) {
                        $image_id = get_post_thumbnail_id();
                        $image_attributes = wp_get_attachment_image_src($image_id, 'medium');
                        ?>
                        <img src="<?php echo $image_attributes[0]; ?>" width="100%">
                    <?php } else { ?>
                        <img src="<?php bloginfo('template_url') ?>/images/no-imagen.jpg" style="width: 100%;">
                    <?php } ?>
                </div>
                <div class="texto-caja">
                    <p><?php echo excerpt(30); ?></p>
                </div>

                <a href="<?php the_permalink(); ?>">Ver más...</a>
            <?php endif; ?>
            <?php wp_reset_postdata(); ?>
        </div>
    </div>
</div>